dataPtr ds.l 1 ; offset: $1C (28) ; <--> user supplied buffer where to copy data
sizeof EQU * ; size: $20 (32)
ENDR
MBResetMailItemIteratorPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
iterator ds.l 1 ; offset: $18 (24) ; <--> mail item iterator to reset
sizeof EQU * ; size: $1C (28)
ENDR
; MarkLetter Read/Unread and/or In Trash/Out of Trash.
MBMarkLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
containerRef ds.l 1 ; offset: $18 (24) ; --> container in which letter resides
seqNum ds MailSeqNum ; offset: $1C (28) ; --> mail sequence number of the letter
readMark ds.l 1 ; offset: $22 (34) ; --> must be kMBLetterRead, kMBLetterUnread or kMBLeaveReadMark
trashMark ds.l 1 ; offset: $26 (38) ; --> must be kMBLetterNotInTrash, kMBLetterInTrash or kMBLeaveTrashMark
sizeof EQU * ; size: $2A (42)
ENDR
; Stores the MailItem locally.
MBCopyLocalPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
containerRef ds.l 1 ; offset: $18 (24) ; --> container in which letter resides
seqNum ds MailSeqNum ; offset: $1C (28) ; --> mail sequence number of the desired letter
progressIndicator ds.l 1 ; offset: $22 (34) ; --> created using MBCreateProgressIndicatoror kOCENoProgressIndicator if client does not desire progress indication.
copyOperationRef ds.l 1 ; offset: $26 (38) ; <-- ref to this copy operation for use in cancel
newSeqNum ds MailSeqNum ; offset: $2A (42) ; <-- seqNum of new letter after successful operation
sizeof EQU * ; size: $30 (48)
ENDR
MBCopyToFilePB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
containerRef ds.l 1 ; offset: $18 (24) ; --> container in which letter resides
seqNum ds MailSeqNum ; offset: $1C (28) ; --> mail sequence number of the desired letter
specPtr ds.l 1 ; offset: $22 (34) ; --> spec of file which will contain the local copy
progressIndicator ds.l 1 ; offset: $26 (38) ; --> created using MBCreateProgressIndicator or kOCENoProgressIndicator if client does not desire progress indication.
copyOperationRef ds.l 1 ; offset: $2A (42) ; <-- ref to this copy operation for use in cancel
sizeof EQU * ; size: $2E (46)
ENDR
; Cancels the copy operation, if possible.
MBCancelCopyPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
copyOperationRef ds.l 1 ; offset: $18 (24) ; --> reference to copyLocal or copyToFile operation to cancel
sizeof EQU * ; size: $1C (28)
ENDR
; An irrevocable delete of an item from a container.
MBDeleteLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
containerRef ds.l 1 ; offset: $18 (24) ; --> container in which letter resides
seqNum ds MailSeqNum ; offset: $1C (28) ; --> mail sequence number of the letter to delete
sizeof EQU * ; size: $22 (34)
ENDR
; Forces a MailItem to be sent right now. This operation only works on MailItems in the outbox.
MBSendNowPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
containerRef ds.l 1 ; offset: $18 (24) ; --> ref of the outbox container in which letter resides
seqNum ds MailSeqNum ; offset: $1C (28) ; --> mail sequence number of the letter to send
timeOut ds.l 1 ; offset: $22 (34) ; --> time in seconds to wait for a response from server
; Creates a letter given the relevant info about the letter.
MBCreateLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; <-- MailMsgRef of the letter just created
senderIdentity ds.l 1 ; offset: $1C (28) ; --> authenticated identity of the sender
msgType ds IPMMsgType ; offset: $20 (32) ; --> type, creator, and class of the sending application
diskForm ds.b 1 ; offset: $44 (68) ; --> true to create letter on disk, otherwise in the outbox
filler ds.b 1 ; offset: $45 (69)
diskLetter ds FSSpec ; offset: $46 (70) ; --> diskForm is true, it specifies where to create the letter
bccRecipients ds.b 1 ; offset: $8C (140) ; --> set to true if creating letter with bcc recipients
filler2 ds.b 1 ; offset: $8D (141)
sizeof EQU * ; size: $8E (142)
ENDR
; Submits a letter for processing.
MBSubmitLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> ref to the letter that you wish to submit
submitFlag ds.b 1 ; offset: $1C (28) ; --> throw letter away if submitFlag is false
filler ds.b 1 ; offset: $1D (29)
letterID ds MailLetterID ; offset: $1E (30) ; <-- persistent ID of the letter accross the whole system
signaturePtr ds.l 1 ; offset: $2E (46) ; --> pointer to digital signature
signatureSize ds.l 1 ; offset: $32 (50) ; --> size of the digital signature
signatureContext ds.l 1 ; offset: $36 (54) ; --> pointer to the signature context
sizeof EQU * ; size: $3A (58)
ENDR
; Begin a nested mail item within some mail item.
MBBeginNestedLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> the letter within which you wish to nest
reserved ds.l 1 ; offset: $1C (28) ; --> must be set to NIL
msgType ds IPMMsgType ; offset: $20 (32) ; --> creator and type of the nested message to create
sizeof EQU * ; size: $44 (68)
ENDR
; End the nested mail item. This function is always executed synchronously.
MBEndNestedLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> the message containing the nested letter to end
sizeof EQU * ; size: $1C (28)
ENDR
; Add attributes to a mail item.
MBAddAttributePB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> the letter to wich you wish to add an attribute
attrID ds.w 1 ; offset: $1C (28) ; --> the type of attribute to add
buffer ds MailBuffer ; offset: $1E (30) ; <--> attributes stored in buffer are copied to the mail item
sizeof EQU * ; size: $2A (42)
ENDR
; Adds an enclosure to a mail item. This function is always executed synchronously.
MBAddEnclosurePB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> the letter to wich you wish to add an enclosure
contentEnclosure ds.b 1 ; offset: $1C (28) ; --> whethet this enclosure contains the main content of the mail
filler ds.b 1 ; offset: $1D (29)
hfs ds.b 1 ; offset: $1E (30) ; --> true if in the file system, false if in memory
append ds.b 1 ; offset: $1F (31) ; --> whether to append data in buffer to current enclosure
buffer ds MailBuffer ; offset: $20 (32) ; <--> unused if hfs is true, otherwise it contains the file's resource and data forks
enclosure ds FSSpec ; offset: $2C (44) ; --> specifies the file or folder you wish to enclose
addlInfo ds MailEnclosureInfo ; offset: $72 (114) ; --> specifies file system info for the enclosure
sizeof EQU * ; size: $82 (130)
ENDR
; Adds a block to a mail item.
MBAddBlockPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> the message to wich you wish to add a block
refCon ds.l 1 ; offset: $1C (28) ; --> reserved for your use
blockType ds OCECreatorType ; offset: $20 (32) ; --> creator and type of the block that you want to write
append ds.b 1 ; offset: $28 (40) ; --> whether to append the data in you buffer to the current block
filler ds.b 1 ; offset: $29 (41)
buffer ds MailBuffer ; offset: $2A (42) ; <--> stores the data you want to write to the message
mode ds.w 1 ; offset: $36 (54) ; --> if blockType is kMailTunnelLtrType or kMailHopInfoType mode is assumed to be kMailFromMark
offset ds.l 1 ; offset: $38 (56) ; --> offset to use to determine the starting point of the write set to 0 to start new block, ignored when append is false
sizeof EQU * ; size: $3C (60)
ENDR
; Adds a letter to another one.
MBAddLetterPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
newMsgRef ds.l 1 ; offset: $18 (24) ; --> the new letter you are composing
msgRef ds.l 1 ; offset: $1C (28) ; --> the original letter you want to add to the new letter
sizeof EQU * ; size: $20 (32)
ENDR
; Adds content to a mail item.
MBAddContentPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> message from which to add some content
segmentType ds.w 1 ; offset: $1C (28) ; --> segment type of data tou want to write
append ds.b 1 ; offset: $1E (30) ; --> whether to copy data from buffer into mail item
filler ds.b 1 ; offset: $1F (31)
buffer ds MailBuffer ; offset: $20 (32) ; <--> place the data in this buffer
textScrap ds.l 1 ; offset: $2C (44) ; --> a pointer to a style scrap structure
startNewScript ds.b 1 ; offset: $30 (48) ; --> whether the data in buffer uses a new character set
filler2 ds.b 1 ; offset: $31 (49)
script ds.w 1 ; offset: $32 (50) ; --> valid only if startNewScript is true
sizeof EQU * ; size: $34 (52)
ENDR
; Reads the content of a mail item.
MBReadContentPB RECORD 0
qLink ds.l 1 ; offset: $0 (0)
reservedH1 ds.l 1 ; offset: $4 (4)
reservedH2 ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
saveA5 ds.l 1 ; offset: $12 (18)
reqCode ds.w 1 ; offset: $16 (22)
msgRef ds.l 1 ; offset: $18 (24) ; --> message from which to read the content
segmentMask ds.w 1 ; offset: $1C (28) ; --> the types of segments that you want to read
buffer ds MailBuffer ; offset: $1E (30) ; <--> user suppiled buffer into which to write the segment
textScrap ds.l 1 ; offset: $2A (42) ; <--> a pointer to a style scrap structure
script ds.w 1 ; offset: $2E (46) ; <-- the character set of the text placed in your buffer
segmentType ds.w 1 ; offset: $30 (48) ; <-- the type of the current data segment
endOfScript ds.b 1 ; offset: $32 (50) ; <-- whether the text in your buffer is the end of a script run
endOfSegment ds.b 1 ; offset: $33 (51) ; <-- whether we reached the end of a segment
endOfContent ds.b 1 ; offset: $34 (52) ; <-- whether we reached the end of the letter's content block
filler ds.b 1 ; offset: $35 (53)
segmentLength ds.l 1 ; offset: $36 (54) ; <-- number of bytes in the current segment